<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@drawable/bg_gradient"
    tools:context=".view.Activities.AddCardActivity">

    <View
        android:id="@+id/view_bg"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        app:layout_constraintBottom_toTopOf="@+id/ll_bg"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintVertical_weight="1" />

    <LinearLayout
        android:id="@+id/ll_bg"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:background="?attr/second_background"
        android:orientation="vertical"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/view_bg"
        app:layout_constraintVertical_weight="1" />

    <androidx.core.widget.NestedScrollView
        android:id="@+id/nsv"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_marginHorizontal="@dimen/_20sdp"
        android:layout_marginVertical="@dimen/_50sdp"
        android:background="@drawable/bg_form_rounded"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent">
        <!-- Main block -->
        <LinearLayout
            android:id="@+id/ll_main_block"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical"
 >

            <androidx.cardview.widget.CardView
                android:layout_width="@dimen/_220sdp"
                android:layout_height="@dimen/_120sdp"
                android:layout_gravity="center"
                android:layout_marginTop="@dimen/_27sdp"
                android:layout_marginBottom="@dimen/_10sdp"
                android:outlineSpotShadowColor="@color/purple"
                android:background="@android:color/transparent"
                app:cardCornerRadius="25dp"
                app:cardElevation="15dp">

                <androidx.constraintlayout.widget.ConstraintLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent"
                    android:background="@drawable/background_card_blue">

                    <TextView
                        android:id="@+id/tvFio"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:fontFamily="@font/inter_medium"
                        android:textColor="@color/white"
                        android:layout_marginBottom="@dimen/_10sdp"
                        android:layout_marginStart="@dimen/_20sdp"
                        app:layout_constraintBottom_toBottomOf="parent"
                        app:layout_constraintStart_toStartOf="parent" />

                    <TextView
                        android:id="@+id/tvDate"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:fontFamily="@font/inter_medium"
                        android:textColor="@color/white"
                        android:textSize="@dimen/_10sdp"
                        android:layout_marginEnd="@dimen/_10sdp"
                        android:layout_marginBottom="@dimen/_6sdp"
                        app:layout_constraintBottom_toBottomOf="parent"
                        app:layout_constraintEnd_toEndOf="parent" />
                </androidx.constraintlayout.widget.ConstraintLayout>
            </androidx.cardview.widget.CardView>


            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                android:paddingHorizontal="@dimen/_20sdp"
                android:paddingBottom="@dimen/_10sdp">
                <!-- Card number -->
                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="@dimen/_7sdp"
                    android:layout_marginTop="@dimen/_7sdp"
                    android:layout_marginBottom="@dimen/_3sdp"
                    android:orientation="horizontal">

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:fontFamily="@font/inter_semibold"
                        android:text="Номер карты"
                        android:textColor="?attr/title_EditText_text_color"
                        android:textSize="@dimen/_11ssp" />

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:fontFamily="@font/inter_semibold"
                        android:text="*"
                        android:textColor="?attr/red_dot"
                        android:textSize="@dimen/_11ssp"  />
                </LinearLayout>

                <EditText
                    android:id="@+id/etCardNumber"
                    android:layout_width="match_parent"
                    android:layout_height="@dimen/_40sdp"
                    android:background="@drawable/edit_text_form"
                    android:fontFamily="@font/inter_medium"
                    android:hint="Номер карты"
                    android:inputType="number"
                    android:paddingHorizontal="@dimen/_9sdp"
                    android:paddingVertical="@dimen/_5sdp"
                    android:textColor="?attr/EditText_text_color"
                    android:textSize="@dimen/_12sdp" />
                <!-- /Card number -->

                <!-- Card name -->
                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="@dimen/_7sdp"
                    android:layout_marginTop="@dimen/_7sdp"
                    android:layout_marginBottom="@dimen/_3sdp"
                    android:orientation="horizontal">

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:fontFamily="@font/inter_semibold"
                        android:text="Фамилия и имя"
                        android:textColor="?attr/title_EditText_text_color"
                        android:textSize="@dimen/_11ssp"  />

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:fontFamily="@font/inter_semibold"
                        android:text="*"
                        android:textColor="?attr/red_dot"
                        android:textSize="@dimen/_11ssp"  />
                </LinearLayout>

                <EditText
                    android:id="@+id/etCardName"
                    android:layout_width="match_parent"
                    android:layout_height="@dimen/_40sdp"
                    android:background="@drawable/edit_text_form"
                    android:fontFamily="@font/inter_medium"
                    android:hint="Фамилия и имя"
                    android:inputType="text"
                    android:paddingHorizontal="@dimen/_9sdp"
                    android:paddingVertical="@dimen/_5sdp"
                    android:textColor="?attr/EditText_text_color"
                    android:textSize="@dimen/_12sdp"/>
                <!-- /Card name -->

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="@dimen/_7sdp"
                    android:orientation="horizontal">

                    <LinearLayout
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_weight="1"
                        android:orientation="vertical">
                        <!-- Card data -->
                        <LinearLayout
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:layout_marginStart="@dimen/_7sdp"
                            android:layout_marginTop="@dimen/_7sdp"
                            android:layout_marginBottom="@dimen/_3sdp"
                            android:orientation="horizontal">

                            <TextView
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:fontFamily="@font/inter_semibold"
                                android:text="Дата"
                                android:textColor="?attr/title_EditText_text_color"
                                android:textSize="@dimen/_11ssp"  />

                            <TextView
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:fontFamily="@font/inter_semibold"
                                android:text="*"
                                android:textColor="?attr/red_dot"
                                android:textSize="@dimen/_11ssp"  />
                        </LinearLayout>

                        <EditText
                            android:id="@+id/etCardDate"
                            android:layout_width="match_parent"
                            android:layout_height="@dimen/_40sdp"
                            android:background="@drawable/edit_text_form"
                            android:fontFamily="@font/inter_medium"
                            android:hint="01/29"
                            android:inputType="number"
                            android:paddingHorizontal="@dimen/_9sdp"
                            android:paddingVertical="@dimen/_5sdp"
                            android:textColor="?attr/EditText_text_color"
                            android:textSize="@dimen/_12sdp" />
                        <!-- /Card data -->
                    </LinearLayout>

                    <View
                        android:layout_width="@dimen/_7sdp"
                        android:layout_height="wrap_content"/>

                    <LinearLayout
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_weight="1"
                        android:orientation="vertical">
                        <!-- Card cvc -->
                        <LinearLayout
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:layout_marginStart="@dimen/_7sdp"
                            android:layout_marginTop="@dimen/_7sdp"
                            android:layout_marginBottom="@dimen/_3sdp"
                            android:orientation="horizontal">

                            <TextView
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:fontFamily="@font/inter_semibold"
                                android:text="Код cvc/cvv"
                                android:textColor="?attr/title_EditText_text_color"
                                android:textSize="@dimen/_11ssp" />

                            <TextView
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:fontFamily="@font/inter_semibold"
                                android:text="*"
                                android:textColor="?attr/red_dot"
                                android:textSize="@dimen/_11ssp"  />
                        </LinearLayout>

                        <EditText
                            android:id="@+id/etCardCvc"
                            android:layout_width="match_parent"
                            android:layout_height="@dimen/_40sdp"
                            android:background="@drawable/edit_text_form"
                            android:fontFamily="@font/inter_medium"
                            android:hint="Код"
                            android:inputType="number"
                            android:paddingHorizontal="@dimen/_9sdp"
                            android:paddingVertical="@dimen/_5sdp"
                            android:textColor="?attr/EditText_text_color"
                            android:textSize="@dimen/_12sdp" />
                        <!-- /Card cvc -->
                    </LinearLayout>

                </LinearLayout>
            </LinearLayout>


            <androidx.cardview.widget.CardView
                android:layout_width="@dimen/_200sdp"
                android:layout_height="@dimen/_40sdp"
                android:layout_marginTop="@dimen/_30sdp"
                android:layout_marginBottom="30dp"
                android:layout_gravity="center"
                android:background="@android:color/transparent"
                android:outlineSpotShadowColor="@color/purple"
                app:cardCornerRadius="15dp"
                app:cardElevation="15dp">
                <androidx.appcompat.widget.AppCompatButton
                    android:id="@+id/btAddCard"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:background="@drawable/background_button_ripple"
                    android:fontFamily="@font/inter_semibold"
                    android:text="Добавить"
                    android:textAllCaps="false"
                    android:textColor="?attr/white"
                    android:textSize="@dimen/_13ssp"
                    android:paddingVertical="@dimen/_7sdp" />
            </androidx.cardview.widget.CardView>

        </LinearLayout><!-- /Main block -->
    </androidx.core.widget.NestedScrollView>


    <LinearLayout
        android:id="@+id/ll_text"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:gravity="start|center"
        android:padding="@dimen/_10sdp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent">

        <ImageButton
            android:id="@+id/ib_back"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:layout_marginStart="@dimen/_10sdp"
            android:background="@drawable/icon_arrow_left"
            android:backgroundTint="?attr/white"/>

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:fontFamily="@font/inter_medium"
            android:gravity="start|center"
            android:paddingStart="@dimen/_20sdp"
            android:text="Добавление карты"
            android:textColor="?attr/white"
            android:textSize="@dimen/_19sdp" />
    </LinearLayout>

</androidx.constraintlayout.widget.ConstraintLayout>